<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8" isELIgnored="false"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="chtml" uri="http://www.szhelper.com/jsp/html"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="zh-CN" lang="zh-CN">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>标的列表</title>
</head>
<body>
<c:set var="pass" value="<%=com.hengpeng.itfinbase.en.BorrowStatus.PASS%>"/>
<c:set var="rais" value="<%=com.hengpeng.itfinbase.en.BorrowStatus.RAISE%>"/>
<c:set var="scheduled" value="<%=com.hengpeng.itfinbase.en.BorrowStatus.SCHEDULED%>"/>
<c:set var="lossed" value="<%=com.hengpeng.itfinbase.en.BorrowStatus.LOSSED%>"/>
<c:set var="lossing" value="<%=com.hengpeng.itfinbase.en.BorrowStatus.LOSSING%>"/>
<c:set var="repay" value="<%=com.hengpeng.itfinbase.en.BorrowStatus.REPAYMENTING%>"/>
<div class="youarehere">标的管理&gt; 
<span>
<c:choose>
<c:when test="${status eq pass}">待排期标的</c:when>
<c:when test="${status eq scheduled}">已排期标的</c:when>
<c:when test="${status eq rais}">筹款中标的</c:when>
<c:when test="${status eq repay}">还款中标的</c:when>
<c:otherwise>标的列表</c:otherwise></c:choose>
</span>
</div>
<div id="content">
<form action='<chtml:path path="/" />borrowInfo/runList/${status}' method="post" id="borrowInfoForm">
<table width="99%" align="center" border="0" cellpadding="1"
	cellspacing="1" class="data_table">
	<tr>
		<td class="data_tab_th" colspan="4">
		<c:choose>
		    <c:when test="${status eq pass}">待排期标的</c:when>
		    <c:when test="${status eq scheduled}">已排期标的</c:when>
		    <c:when test="${status eq rais}">筹款中标的</c:when>
		    <c:otherwise>标的列表</c:otherwise>
	    </c:choose></td>
	</tr>
	<tr>
		<td class="data_tab_tdr">标的名称</td>
		<td class="data_tab_tdl"><input type="text" value="${borrowName}" name="borrowName" /></td>
		<td class="data_tab_tdr">借款用户</td>
		<td class="data_tab_tdl"><input type="text" value="${borrowUserName}" name="borrowUserName" /></td>
	</tr>
	<tr>
		<td class="data_tab_tdr">申请时间(起始)</td>
		<td class="data_tab_tdl"><input type="text" value="${startTime}" name="startTime" id="startTime" readonly /><script type="text/javascript">Calendar.showDate("startTime");</script></td>
		<td class="data_tab_tdr">申请时间(结束)</td>
		<td class="data_tab_tdl"><input type="text" value="${endTime}" name="endTime" id="endTime" readonly /><script type="text/javascript">Calendar.showDate("endTime");</script></td>
	</tr>
	<tr>
		<td align="center" colspan="4" class="bg_bai">		
		<div class="mr_20 t_c">
		<input type="submit" class="pub_bt" value="查询" onclick='document.getElementsByName("PaginationButton_CurrentPage4list")[0].value=1;'/>
		<input type="button" class="pub_bt" value="重置" onclick="this.form.reset();" />
		</div>		
	    </td>
	</tr>
</table>
<br />
<c:choose>
<c:when test="${status eq pass}">
<!-- 自定义标签示例 --> 
   <chtml:list collection="borrowList" type="com.hengpeng.itfinoss.controller.vo.BorrowInfoVo"  
	includeFields="borrowName,borrowUserName,borrowMoney,borrowRate,borrowDurationDec,repaymentType,status,createTime"
    showCheckBox="false" title="标的列表" paginationName="borrowListPage" detailLink="/borrowInfo/detail/@{id}" linkTarget="_self" showLinkField="borrowName">
   <chtml:button destination="/borrowInfo/preschedule/@{id}" showText="排期" description="标的排期" image="/layout/list/edit.gif" />
   </chtml:list>
</c:when>
<c:when test="${status eq scheduled}">     
    <chtml:list collection="borrowList" type="com.hengpeng.itfinoss.controller.vo.BorrowInfoVo"  
	includeFields="borrowName,borrowUserName,borrowMoney,borrowRate,borrowDurationDec,repaymentType,status,createTime,bidOpenTime,bidStopTime"
    showCheckBox="false" title="标的列表" paginationName="borrowListPage" detailLink="/borrowInfo/detail/@{id}" linkTarget="_self" showLinkField="borrowName">
    </chtml:list>
</c:when>
<c:when test="${status eq rais}">
    <chtml:list collection="borrowList" type="com.hengpeng.itfinoss.controller.vo.BorrowInfoVo"  
	includeFields="borrowName,borrowUserName,borrowMoney,borrowRate,borrowDurationDec,repaymentType,status,bidOpenTime,bidStopTime,raiseMoney,raiseNum"
    showCheckBox="false" title="标的列表" paginationName="borrowListPage" detailLink="/borrowInfo/detail/@{id}" linkTarget="_self" showLinkField="borrowName">
    <chtml:button destination="/borrowInfo/doEnd/@{id}?_method=get" showText="截止" description="截止" image="layout/list/edit.gif" />
    </chtml:list>
</c:when>
<c:otherwise>
    <chtml:list collection="borrowList" type="com.hengpeng.itfinoss.controller.vo.BorrowInfoVo"  
	includeFields="borrowName,borrowUserName,borrowMoney,borrowRate,borrowDurationDec,repaymentType,status,bidStopTime"
    showCheckBox="false" title="标的列表" paginationName="borrowListPage" detailLink="/borrowInfo/detail/@{id}" linkTarget="_self" showLinkField="borrowName">
    </chtml:list>
</c:otherwise>
</c:choose>

</form>
</div>
</body>
</html>
